
/****
 * Copyright (C) 2006 dNux Team      
 *                                                            ****
 * This program is free software; you can redistribute it and/or *
 * modify under the terms of the GNU General Public License as   *
 * published by the Free Software Foundation;                    *
 * either version 2 of the License.                              *
 *                                                               *
 * This program is distributed in the hope that it will be       *
 * useful, but WITHOUT ANY WARRANTY; without even the implied    *
 * warranty of without even the implied waranty of               *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.          *
 * See the GNU General Public License for more details.          *
 *                                                               *
 * You should have received a copy of the                        *
 * GNU General Public License                                    *
 * along with this program; if not, write to the                 *
 * Free Software Foundation, Inc.,                               *
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. *
 *                                                               *
 ****                                                         ****/

#ifndef __DCORE_OPTION_H__
#define __DCORE_OPTION_H__

typedef enum _d_option_type_e {
  D_OPTION_VOID,
  D_OPTION_STRING,
  D_OPTION_INTEGER,
} d_option_type_t;

typedef struct _d_option_s {
  char            *long_name;
  char            *short_name;
  char            *help;
  d_option_type_t  type;
  void            *data;
} d_option_t;

void d_option_parse(d_option_t *options, int *argc, char ***argv,
		    d_error_t **error);

void d_option_help(d_option_t *options);

#endif /* __DCORE_OPTION_H */

